<extend name="Public:base" />
<!-- 网站标题 -->
<block name="title">一票否决审核页面</block>
<block name="appendheader">
	<!-- 删除确认插件 -->
	<script type="text/javascript" src="__PUBLIC__/artDialog/jquery.artDialog.js?skin=default"></script> 
	<script type="text/javascript" src="__PUBLIC__/artDialog/iframeTools.js"></script> 
	<script type="text/javascript" src="__PUBLIC__/common/js/list.js"></script> 
	<script type="text/javascript">
		$(function() {
			$("#WebMenu-4000").addClass('active');	//选中父菜单
			$("#WebMenu-4001").addClass('active');	//选中当前菜单
			
			
			
		});
		//打开授权页面
		//打开授权页面
		function set_role_page(name) {
			if(name != ''){
				art.dialog.alert(name);
		        return;
			}
		}
		function searchFormSubmit() {
			$('#researchmyform').submit();
		}
		//批量操作确认
		//op:操作类型 	form_id:要提交的表单id
		function confirm_manageall(op){
		    var selectFlag = false;
		    var confirm_info = '';
		    var strChecked = '';
		    $("input[id='ids']").each(function() {
		        if(this.checked==true){
		            selectFlag = true;
		            strChecked += "'" + this.value + "',";
		        }
		    });
		    if(strChecked != '') {
		    	strChecked = strChecked.substr(0, strChecked.length-1);
		    }
		    
		    if(selectFlag == false){
		        art.dialog.alert("没有选中数据！");
		        return;
		    }
		    
		    //操作确认信息提示
		    if(op == 'delete') {
		    	confirm_info = '您确定要删除选中的内容吗？';
		    } else if(op == 'audits') {
		    	confirm_info = '您确定要审核选中的记录吗？';
		    } else {
		    	art.dialog.alert("未知操作类型！");
		        return;
		    }
		  	
		    //隐藏域赋值操作类型
		    $("#myform input[type='hidden'][name='op']").val(op);
		    
		    art.dialog.confirm(confirm_info, function() { 
		    	$('#myform').submit();
			});
		}
		
		//单个操作确认
		function confirm_manage(op, name){
			$("input[id='ids']").each(function() {
		        if(this.checked==true){
		        	this.checked==false;
		        }
		    });
			
			//操作确认信息提示
		    if(op == 'delete') {
		    	confirm_info = '您确定要删除该内容吗？';
		    } else if(op == 'cancel_audit') {
		    	confirm_info = '您确定要取消已经审核的记录吗？';
		    } else {
		    	art.dialog.alert("未知操作类型！");
		        return;
		    }
			
		  	//隐藏域赋值操作类型
		    $("#myform input[name='op']").val(op);
			
			//以下语句只适用于MAdmin框架，MAdmin框架中main.js的第387行
			$('.checkall').closest('table').find('input[type=checkbox]').iCheck('uncheck');
			$("input[name='"+name+"']").iCheck('check');
		    art.dialog.confirm(confirm_info, function() { 
		    	$('#myform').submit();
			});
		}
	</script>
	<script type="text/javascript" src="__PUBLIC__/artDialog/artDialog.source.js?skin=default"></script>
	<script type="text/javascript" src="__PUBLIC__/artDialog/iframeTools.js"></script>
	<link type="text/css" href="__PUBLIC__/tplConfig/tplConfig.css" rel="stylesheet" />
</block>
<!-- 当前位置 -->
<block name="breadcrumb">
	<div class="page-header pull-left">
		<div class="page-title">一票否决审核</div>
	</div>
	<ol class="breadcrumb page-breadcrumb pull-left">
		<li><i class="fa fa-home"></i>&nbsp;<a href="__APP__?g=Admin">首页</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li><a href="#">审核管理设置</a>&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
		<li class="active">一票否决审核</li>
	</ol>
</block>
<!-- 网页主内容区 -->
<block name="main_content">
	<div class="row">
		<div class="col-md-12">
			<div class="portlet box">
				<div class="portlet-body">
					<form id="researchmyform" name="researchmyform" action="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a={:ACTION_NAME}" method="post">
						<div class="row mbm">
							<div class="col-md-6"> 
								<a href="javascript:confirm_manageall('audits');" class="btn btn-warning"><i class="fa fa-check-square-o"></i>&nbsp;批量审核</a>&nbsp;
							</div>
							<div class="col-md-4">
								<!-- 公用条件检索html（若特殊则需单独处理） -->
								<include file="Public:search" />
							</div>
						</div>
					</form>
					<form id="myform" name="myform" action="__APP__?g={:GROUP_NAME}&m={:MODULE_NAME}&a=manage" method="post" >
						<input type="hidden" name="op" value="" />
						<table class="table table-hover table-striped table-bordered table-advanced tablesorter tb-sticky-header">
							<thead>
								<tr>
									<th width="5%">
										<input type="checkbox" class="checkall" />
									</th>
									<th width="10%">语言文件</th>
									<th width="50%">识别内容</th>
									<th width="5%">提交者</th>
									<th width="5%">提交日期</th>
									<th width="5%">状态</th>
									<th width="10%">管理操作</th>
								</tr>
							</thead>
							<tbody>
								<volist name="data" id="vo">
		 							<tr>
										<td><input type="checkbox" id="ids" name="ids[{$i}]" value="{$vo.id}" /></td>
										<td><a href="__ROOT__/{$vo.path}" target="_blank" style="color:blue;">{$vo.name}&nbsp;&nbsp;&nbsp;<i class="fa fa-pause"></i></a></td>
										<td><a href="javascript:set_role_page('ids[{$vo.rs}]');"><p style="width:600px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><i class="fa fa-file-text-o"></i>&nbsp;{$vo.rs}</p></a></td>
										<td>{$vo.operator}</td>
										<td>{$vo.update_date}</td>
										<td>
										<eq name="vo.audit" value="a">
											<span class=" text-warning">待审核</span>
										<else />
											<span class="text-success">已审核</span>
										</eq>
										</td>
										<td>
											<a href="__APP__?g={:GROUP_NAME}&m=SpeechRecognition&a=yun_wz&id={$vo.id}" target = "_blank" class="btn btn-success btn-xs mbs"><i class="fa fa-plus"></i>&nbsp;关键词提取</a>&nbsp;
											<a href="__APP__?g={:GROUP_NAME}&m=SpeechRecognition&a=yun_qg&id={$vo.id}" target = "_blank" class="btn btn-success btn-xs mbs"><i class="fa fa-plus"></i>&nbsp;情感分析</a>&nbsp;
											<a href="__APP__?g={:GROUP_NAME}&m=SpeechRecognition&a=yun_mgc&id={$vo.id}" class="btn btn-success btn-xs mbs"><i class="fa fa-plus"></i>&nbsp;敏感词过滤</a>&nbsp;
											<eq name="vo.audit" value="a"><a type="button" class="btn btn-success btn-xs mbs" href="__APP__?g=Admin&m=LeaderCheck&a=audit&id={$vo.id}"><i class="fa fa-check-square-o"></i>审核</a></eq>
                                            <eq name="vo.audit" value="b"><a type="button" class="btn btn-success btn-xs mbs" href="javascript:confirm_manage('cancel_audit','ids[{$i}]')"><i class="fa fa-ban"></i>取消审核</a></eq>
										</td>
									</tr>
								</volist>
							</tbody>
						</table>
					</form>
					<!-- 显示分页信息 -->
					{$show}
				</div>
			</div>
		</div>
	</div>
	<!-- 设置权限 -->
	<div style="display: display;" id="set_role_page" tabindex="-1" role="dialog" aria-labelledby="modal-responsive-label" aria-hidden="true" class="modal fade">
		<div class="modal-dialog">
			<div class="modal-content"></div>
		</div>
	</div>
</block>